// 函数组件
import { createVNode, render } from 'vue'
import _Message from './index.vue'
const Message = ({ type, text }) => {
  const VNode = createVNode(_Message, { type, text })
  // 创建挂载
  const div = document.createElement('div')
  document.body.appendChild(div)
  render(VNode, div)
  setTimeout(() => {
    render(null,div)
  }, 1400);
}

export default Message
